package com.ziyueyuwen.xiniao.service;

import com.ziyueyuwen.xiniao.bean.homework.*;

import java.util.List;

/**
 * @author jun 2018/12/22.
 */
public interface HomeworkRecordService {
    /**
     * 添加记录
     *
     * @param zyHomeworkRecord ZyHomeworkRecordDO
     * @return Boolean
     */
    Boolean add(ZyHomeworkRecordDO zyHomeworkRecord);

    /**
     * 更新学生答案
     *
     * @param id             Integer
     * @param answerInfoList List
     * @return Boolean
     */
    Boolean updateStudentAnswer(Integer id, List<AnswerData> answerInfoList);

    /**
     * 根据id获取数据
     *
     * @param id Integer
     * @return ZyHomeworkRecordDO
     */
    ZyHomeworkRecordDO getById(Integer id);

    /**
     * 根据学生id和课节id获取数据
     *
     * @param studentId String
     * @param lessonId  Integer
     * @return ZyHomeworkRecordDO
     */
    ZyHomeworkRecordDO getByStudentIdAndLessonId(String studentId, Integer lessonId);

    /**
     * 根据班级id获取数据
     *
     * @param classId Integer
     * @return List<ZyHomeworkRecordDO>
     */
    List<ZyHomeworkRecordDO> listByClassId(Integer classId);

    /**
     * 完成作业
     *
     * @param id Integer
     * @return Boolean
     */
    Boolean finisHomework(Integer id);

    /**
     * 获取未批改记录
     *
     * @param userId String
     * @return List
     */
    List<HomeworkRecordNotMarkVO> listHomeworkRecordNotMark(String userId);

    /**
     * 评分
     *
     * @param id             Integer
     * @param markInfo       HomeworkMarkData
     * @param answerInfoList List
     * @return Boolean
     */
    Boolean markHomeworkRecord(Integer id, HomeworkMarkData markInfo, List<AnswerData> answerInfoList);

    /**
     * 获取作业状态
     *
     * @param studentId String
     * @param lessonId  Integer
     * @return HomeworkStatusEnum
     */
    HomeworkRecordStatusDO getHomeworkStatus(String studentId, Integer lessonId);

    /**
     * 获取作业记录
     *
     * @param courseId    Integer
     * @param lessonIndex Integer
     * @return List
     */
    List<ZyHomeworkRecordDO> getByCourseIdAndLessonIndex(Integer courseId, Integer lessonIndex);

    /**
     * 保存课堂互动记录
     *
     * @param eeoClassId        Integer
     * @param subjectQuestionId Integer
     * @param testNum           Integer
     * @param questionSize      Integer
     * @param dataStr           String
     */
    void saveClassroomTestRecord(Integer eeoClassId, Integer subjectQuestionId, Integer testNum, Integer questionSize, String dataStr);

    /**
     * 获取用于生成课堂互动报告的数据
     *
     * @param studentAccount String
     * @param lessonId       Integer
     * @return ClassroomTestRecordDataDTO
     */
    ClassroomTestRecordDataDTO getData4ClassroomTestReport(String studentAccount, Integer lessonId);

}
